<!--卡片-->
<template>
  <zh-form-item
		:ref="prop"
		:label="label"
		:prop="prop"
		:span="span"
		:md="md"
		:sm="sm"
		:xs="xs"
		:lg="lg"
		:xl="xl"
		:offset="offset"
		:push="push"
		:pull="pull"
		:tag="tag"
	>
    <zh-switch v-bind="allAttrs" v-model="value" :disabled="props.disabled">
    </zh-switch>
  </zh-form-item>
</template>
<script lang="ts" setup name="zh-form-switch">
import { formItemProps, itemProps } from '../lib/mapController';
import itemController from '@/components/lib/base/controller-item';
// 定义属性
const props = defineProps({
	...formItemProps,
  ...itemProps,
  modelValue: {
		type: [Number, String, Boolean],
		default: false,
	},
});

const attrs = useAttrs();
const allAttrs = computed(() => {
	return Object.assign(props.extend, attrs);
});
console.log(props)
console.log(allAttrs.value)
const emit = defineEmits(['update:modelValue']);
const { value } = itemController(props, allAttrs.value, emit);
</script>
